import Vue from "vue";

function _extend_create(Comp, data) {
    const Ctor = Vue.extend(Comp);
    const vm = new Ctor({
        propsData: data
    }).$mount();
    console.log(vm.$el)
    document.body.appendChild(vm.$el);
    vm.remove = () => {
        document.body.removeChild(vm.$el);
        vm.$destroy();
    }
}

export default _extend_create